Skip to content

Python 3.10#1155

Merged
njooma merged 13 commits intomainfrom
python-310
Mar 17, 2026
Merged

Python 3.10#1155
njooma merged 13 commits intomainfrom
python-310

Conversation

@njooma
Copy link
Member

@njooma njooma commented Mar 16, 2026

Make python 3.10 the minimum supported version.

  • Updates dependencies to new minimums
  • Updates build system and tests to only check for 3.10 and above
  • Removes all the version checks on import
  • Removes a copied function that was only available in python >=3.10

Tested by:

  • Running the code sample from the connect tab on app.viam.com
  • Creating a module, updating the required dependency to the beta version that requires 3.10, and running a cloud build

To Review

  • Ignore all proto generated changes (using a new compiler version, so that's the major change)
  • Pay particular attention to if I got the version checked imports correct

@njooma njooma requested a review from a team as a code owner March 16, 2026 14:18
@github-actions
Copy link
Contributor

Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!

component function
base is_moving
board gpio_pin_by_name
button push
genericcomponent do_command
camera get_images
encoder get_position
motor is_moving
sensor get_readings
servo get_position
switch get_position
arm get_end_position
gantry get_lengths
gripper is_moving
movement_sensor get_linear_acceleration
input_controller get_controls
audio get_properties
pose_tracker get_poses
power_sensor get_power
motion get_pose
vision get_properties
mlmodel metadata
genericservice do_command
slam get_point_cloud_map
audio_in get_properties
audio_out get_properties

import sys
import typing
import typing as _typing
if sys.version_info >= (3, 10):
Copy link
Member

@allisonschiang allisonschiang Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since all versions are 3.10+, can we remove this check? this is generated code so not that it matters but weird this is still here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's generated, can ignore

import sys
import typing
import typing as _typing
if sys.version_info >= (3, 10):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

import builtins as _builtins
import sys
import typing as _typing
if sys.version_info >= (3, 10):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

Copy link
Member

@allisonschiang allisonschiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't check generated code too closely beyond my one comment (same thing in three places) but the non generated code looks like it gets the version checking right

Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@njooma njooma merged commit 0764d1d into main Mar 17, 2026
17 checks passed
@njooma njooma deleted the python-310 branch March 17, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants